package ru.evga.gwt.lib.common.client.request.jsonrpc;

import com.google.gwt.core.client.JavaScriptObject;


public class IntegerJsonRpcResult
    extends JavaScriptObject
{
    protected IntegerJsonRpcResult()
    {
    }

    // JSNI methods 
    /**
     * Returns result id
     */
    public final native String getId() /*-{
        return this.id;
    }-*/;

    public final native String getVersion() /*-{
        return this.jsonrpc;
    }-*/;

    public final native RpcError getError() /*-{
        return this.error;
    }-*/;

    public final native int getResult() /*-{
        return this.result;
    }-*/;

    static public final native  IntegerJsonRpcResult asJsonRpcResult(String json) /*-{
        return eval("(" + json + ")");
    }-*/;
}
